<headBox></headBox>
<div class="container-fluid row" [ngStyle]="currentStyles">
  <div class="sidebar">
    <app-treeview></app-treeview>

  </div>

  <div class="main">
    <div class="userSafe">
      <h3 class="title">账户设置</h3>
      <div class="panel panel-default">
        <ul class="list-group">
          <li class="list-group-item  userAccountB">
            <div>密码修改</div>
          </li>
        </ul>

        <form #form="ngForm" (ngSubmit)="form.form.valid && submitPwd(form.value)" novalidate  role="form" class="form">
          <div class="form-group ">
            <div class="codeBox clearfix">
              <label class="col-sm-3 control-label">原密码：</label>
              <input required type="password" name="oldPwd" [(ngModel)]="resetpwd.oldPassword" #oldPwd="ngModel"  placeholder="请输入原始密码" autocomplete="off" minlength="6">
              <div  *ngIf="form.submitted && !oldPwd.valid"  class="text-danger">原始密码不能为空！</div>
              <!--<div  *ngIf="oldPwd.valid"  class="text-danger">原始密码不正确！</div>-->
            </div>
          </div>
          <div class="form-group ">
            <div class="codeBox clearfix">
              <label class="col-sm-3 control-label">新密码：</label>
              <input required type="password" name="newPwd" [(ngModel)]="resetpwd.newPassword" #newPwd="ngModel" placeholder="请输入6-18位数字组合" autocomplete="off" minlength="6">
              <div *ngIf='form.submitted && (!newPwd.valid)' class="text-danger">新密码不能为空</div>
            </div>
          </div>
          <div class="form-group ">
            <div class="codeBox clearfix">
              <label class="col-sm-3 control-label">确认密码：</label>
              <input required type="password" name="reNewPwd" [(ngModel)]="resetpwd.reNewPassword" #reNewPwd="ngModel" placeholder="请再次输入新密码" autocomplete="off" [disabled]="!newPwd.valid" minlength="6">
              <div *ngIf='form.submitted && (!newPwd.valid)' class="text-danger">确认密码不能为空</div>
              <div *ngIf='form.submitted && !(resetpwd.newPassword==resetpwd.reNewPassword)' class="text-danger">确认密码不一致</div>
            </div>
          </div>
          <div class="form-group ">
            <div class="codeBox clearfix">
              <label class="col-sm-3 control-label"></label>
              <input type="submit" value="确定" class="btn btn-info col-sm-2" [disabled]="!oldPwd.valid||!newPwd.valid||!reNewPwd.valid"/>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

<footBox></footBox>
